<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <title>Title</title>
</head>
<body>

<h1>商品详情</h1>

<table>
    <tr>
        <th>商品名称</th>
        <th>商品价格</th>
        <th>商品库存</th>
        <th>操作</th>
    </tr>

    <tr th:each="user:${product}"><!--循环userList,以users作为形参-->
        <td th:text="${user.name}"></td>
        <td th:text="${user.price}"></td>
        <td th:text="${user.id}"></td>
        <td><a  th:href="@{/del(id=${user.id})}">加入购物车</a></td>
    </tr>
</table>



</body>
</html>